package com.kotlin.flong.reflection

import kotlin.reflect.KClass


/**
 * @Author:liangjl
 * @Date: 2020/7/11-21:59
 * @Eamil:jilongliang@sina.com
 * @Description:
 * 1 KClass
 * 2 KFunction
 */

fun main() {
    val username = "周伯通"
    var kclass: KClass<out String> = username::class
    println(kclass)
    println("==================")

    val kClassDateType: KClass<String> = String::class
    println(kClassDateType)
    println("==================")
    var kclass1: KClass<out String> = "Kotlin"::class
    var kclass2: KClass<out String> = "Swift"::class
    var kclass3: KClass<out String> = "java"::class
    println("$kclass1")
    println("$kclass2")
    println("$kclass3")
    println("==================")
    var kclass4 = Class.forName("java.util.Date").kotlin
    println("$kclass4")
    println(kclass4 == Class.forName("java.util.Date").kotlin)
    println(kclass4 == Class.forName("java.util.Date"))
}